var longestCommonPrefix = function (strs,re = '') {
    if (!strs.length) return re;
    if (strs.length == 1) return strs[0];
    for (var i = 1; i < strs.length; i++) {
        if (!strs[i][0]) return re
        if (strs[i][0] != strs[0][0]) return re
        strs[i] = strs[i].slice(1,strs[i].length);
    }
    re += strs[0][0];
    strs[0] = strs[0].slice(1,strs[0].length);
    return longestCommonPrefix(strs, re);
};
